Optimal. Leaf size=178 \[ \frac {45 a^3 x}{8}+\frac {45 a^3 \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {5 a^3 \cos (c+d x)}{d}-\frac {a^3 \cos ^3(c+d x)}{d}+\frac {5 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {3 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps
used = 16, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2951, 3855,
3852, 8, 3853, 2718, 2713, 2715} \begin {gather*} -\frac {a^3 \cos ^3(c+d x)}{d}-\frac {5 a^3 \cos (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{d}+\frac {5 a^3 \cot (c+d x)}{d}+\frac {a^3 \sin ^3(c+d x) \cos (c+d x)}{4 d}+\frac {3 a^3 \sin (c+d x) \cos (c+d x)}{8 d}+\frac {45 a^3 \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {3 a^3 \cot (c+d x) \csc (c+d x)}{8 d}+\frac {45 a^3 x}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2718
Rule 2951
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \cos (c+d x) \cot ^5(c+d x) (a+a \sin (c+d x))^3 \, dx &=\frac {\int \left (6 a^9-6 a^9 \csc (c+d x)-8 a^9 \csc ^2(c+d x)+3 a^9 \csc ^4(c+d x)+a^9 \csc ^5(c+d x)+8 a^9 \sin (c+d x)-3 a^9 \sin ^3(c+d x)-a^9 \sin ^4(c+d x)\right ) \, dx}{a^6}\\ &=6 a^3 x+a^3 \int \csc ^5(c+d x) \, dx-a^3 \int \sin ^4(c+d x) \, dx+\left (3 a^3\right ) \int \csc ^4(c+d x) \, dx-\left (3 a^3\right ) \int \sin ^3(c+d x) \, dx-\left (6 a^3\right ) \int \csc (c+d x) \, dx-\left (8 a^3\right ) \int \csc ^2(c+d x) \, dx+\left (8 a^3\right ) \int \sin (c+d x) \, dx\\ &=6 a^3 x+\frac {6 a^3 \tanh ^{-1}(\cos (c+d x))}{d}-\frac {8 a^3 \cos (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d}+\frac {1}{4} \left (3 a^3\right ) \int \csc ^3(c+d x) \, dx-\frac {1}{4} \left (3 a^3\right ) \int \sin ^2(c+d x) \, dx+\frac {\left (3 a^3\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}-\frac {\left (3 a^3\right ) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{d}+\frac {\left (8 a^3\right ) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}\\ &=6 a^3 x+\frac {6 a^3 \tanh ^{-1}(\cos (c+d x))}{d}-\frac {5 a^3 \cos (c+d x)}{d}-\frac {a^3 \cos ^3(c+d x)}{d}+\frac {5 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {3 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d}-\frac {1}{8} \left (3 a^3\right ) \int 1 \, dx+\frac {1}{8} \left (3 a^3\right ) \int \csc (c+d x) \, dx\\ &=\frac {45 a^3 x}{8}+\frac {45 a^3 \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {5 a^3 \cos (c+d x)}{d}-\frac {a^3 \cos ^3(c+d x)}{d}+\frac {5 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a^3 \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {3 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.60, size = 235, normalized size = 1.32 \begin {gather*} \frac {a^3 (1+\sin (c+d x))^3 \left (360 (c+d x)-368 \cos (c+d x)-16 \cos (3 (c+d x))+192 \cot \left (\frac {1}{2} (c+d x)\right )-6 \csc ^2\left (\frac {1}{2} (c+d x)\right )-\csc ^4\left (\frac {1}{2} (c+d x)\right )+360 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-360 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+6 \sec ^2\left (\frac {1}{2} (c+d x)\right )+\sec ^4\left (\frac {1}{2} (c+d x)\right )+64 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )-4 \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)+16 \sin (2 (c+d x))-2 \sin (4 (c+d x))-192 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{64 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 312, normalized size = 1.75 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 268, normalized size = 1.51 \begin {gather*} -\frac {4 \, {\left (4 \, \cos \left (d x + c\right )^{3} - \frac {6 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + 24 \, \cos \left (d x + c\right ) - 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a^{3} + 2 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 25 \, \tan \left (d x + c\right )^{2} + 8}{\tan \left (d x + c\right )^{5} + 2 \, \tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a^{3} - 8 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} - 2}{\tan \left (d x + c\right )^{5} + \tan \left (d x + c\right )^{3}}\right )} a^{3} + a^{3} {\left (\frac {2 \, {\left (9 \, \cos \left (d x + c\right )^{3} - 7 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 16 \, \cos \left (d x + c\right ) + 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, size = 258, normalized size = 1.45 \begin {gather*} -\frac {16 \, a^{3} \cos \left (d x + c\right )^{7} - 90 \, a^{3} d x \cos \left (d x + c\right )^{4} + 48 \, a^{3} \cos \left (d x + c\right )^{5} + 180 \, a^{3} d x \cos \left (d x + c\right )^{2} - 150 \, a^{3} \cos \left (d x + c\right )^{3} - 90 \, a^{3} d x + 90 \, a^{3} \cos \left (d x + c\right ) - 45 \, {\left (a^{3} \cos \left (d x + c\right )^{4} - 2 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 45 \, {\left (a^{3} \cos \left (d x + c\right )^{4} - 2 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (2 \, a^{3} \cos \left (d x + c\right )^{7} - 9 \, a^{3} \cos \left (d x + c\right )^{5} + 60 \, a^{3} \cos \left (d x + c\right )^{3} - 45 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{16 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.58, size = 313, normalized size = 1.76 \begin {gather*} \frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 8 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 360 \, {\left (d x + c\right )} a^{3} - 360 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 184 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {250 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} + 136 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 32 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} + 552 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 837 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 1248 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 1100 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 736 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 556 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 152 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}^{4}}}{64 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.96, size = 419, normalized size = 2.35 \begin {gather*} \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{8\,d}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}-\frac {45\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {-34\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+258\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-138\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\frac {2337\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{4}-312\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+525\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-184\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {403\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}-38\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a^3}{4}}{d\,\left (16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+64\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+96\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+64\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\right )}-\frac {45\,a^3\,\mathrm {atan}\left (\frac {2025\,a^6}{16\,\left (\frac {2025\,a^6}{16}+\frac {2025\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}-\frac {2025\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,\left (\frac {2025\,a^6}{16}+\frac {2025\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}\right )}{4\,d}-\frac {23\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________